<?php
/**
 * ExtGridColumnModel class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftware B.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */

class ExtGridColumnModel extends ExtGridColumnModelBase
{
    /**
     * Gets the value of ExtJS defaultSortable property
     * @return Boolean 
     */
    public function getDefaultSortable()
    {
    	return $this->getConfig("defaultsortable");
    }

    /**
     * Sets the value of ExtJS defaultSortable property
     * @param Boolean $value 
     */
    public function setDefaultSortable($value)
    {
    	$this->setConfig("defaultsortable",$value);
    }

    /**
     * Gets the value of ExtJS defaultWidth property
     * @return Number 
     */
    public function getDefaultWidth()
    {
    	return $this->getConfig("defaultwidth");
    }

    /**
     * Sets the value of ExtJS defaultWidth property
     * @param Number $value 
     */
    public function setDefaultWidth($value)
    {
    	$this->setConfig("defaultwidth",$value);
    }

    
    public function __construct()
    {
        parent::__construct();
        $this->configmap = array_merge($this->configmap,array(
            'defaultsortable' => 'defaultSortable',
            'defaultwidth' => 'defaultWidth'
        ));

        $this->eventtable = array_merge($this->eventtable,array(
            'columnmoved' => array('sender','oldIndex','newIndex'),
            'configchange' => array('sender'),
            'headerchange' => array('sender','columnIndex','newText'),
            'hiddenchange' => array('sender','columnIndex','hidden'),
            'widthchange' => array('sender','columnIndex','newWidth')
        ));


        $this->proptags = array_merge($this->proptags,array(
            'gridcolumns' => true,
            'defaults' => true
        ));
        $this->setXType(null);
        $this->setXClass('Ext.grid.ColumnModel');
    }    
}
?>